package com.example.backend.dto;

import com.example.backend.domain.enums.TicketStatusTrackingType;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.Instant;

/**
 * 工单状态跟踪DTO
 */
public class TicketStatusTrackingDto {
    
    private Long id;
    private Long ticketId;
    private TicketStatusTrackingType trackingType;
    private String oldValue;
    private String newValue;
    private String fieldName;
    private String description;
    private Long operatorId;
    private String operatorName;
    private String operatorRole;
    private String ipAddress;
    private Boolean isSystemOperation;
    private Boolean isVisibleToCustomer;
    private String metadata;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Instant createdAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Instant updatedAt;
    
    // 构造函数
    public TicketStatusTrackingDto() {}
    
    public TicketStatusTrackingDto(Long id, Long ticketId, TicketStatusTrackingType trackingType,
                                  String oldValue, String newValue, String fieldName,
                                  String description, Long operatorId, String operatorName,
                                  String operatorRole, Boolean isSystemOperation,
                                  Boolean isVisibleToCustomer, Instant createdAt) {
        this.id = id;
        this.ticketId = ticketId;
        this.trackingType = trackingType;
        this.oldValue = oldValue;
        this.newValue = newValue;
        this.fieldName = fieldName;
        this.description = description;
        this.operatorId = operatorId;
        this.operatorName = operatorName;
        this.operatorRole = operatorRole;
        this.isSystemOperation = isSystemOperation;
        this.isVisibleToCustomer = isVisibleToCustomer;
        this.createdAt = createdAt;
    }
    
    // Getters and Setters
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getTicketId() {
        return ticketId;
    }
    
    public void setTicketId(Long ticketId) {
        this.ticketId = ticketId;
    }
    
    public TicketStatusTrackingType getTrackingType() {
        return trackingType;
    }
    
    public void setTrackingType(TicketStatusTrackingType trackingType) {
        this.trackingType = trackingType;
    }
    
    public String getOldValue() {
        return oldValue;
    }
    
    public void setOldValue(String oldValue) {
        this.oldValue = oldValue;
    }
    
    public String getNewValue() {
        return newValue;
    }
    
    public void setNewValue(String newValue) {
        this.newValue = newValue;
    }
    
    public String getFieldName() {
        return fieldName;
    }
    
    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public Long getOperatorId() {
        return operatorId;
    }
    
    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }
    
    public String getOperatorName() {
        return operatorName;
    }
    
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }
    
    public String getOperatorRole() {
        return operatorRole;
    }
    
    public void setOperatorRole(String operatorRole) {
        this.operatorRole = operatorRole;
    }
    
    public String getIpAddress() {
        return ipAddress;
    }
    
    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }
    
    public Boolean getIsSystemOperation() {
        return isSystemOperation;
    }
    
    public void setIsSystemOperation(Boolean isSystemOperation) {
        this.isSystemOperation = isSystemOperation;
    }
    
    public Boolean getIsVisibleToCustomer() {
        return isVisibleToCustomer;
    }
    
    public void setIsVisibleToCustomer(Boolean isVisibleToCustomer) {
        this.isVisibleToCustomer = isVisibleToCustomer;
    }
    
    public String getMetadata() {
        return metadata;
    }
    
    public void setMetadata(String metadata) {
        this.metadata = metadata;
    }
    
    public Instant getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(Instant createdAt) {
        this.createdAt = createdAt;
    }
    
    public Instant getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(Instant updatedAt) {
        this.updatedAt = updatedAt;
    }
}

